<template>
  <div class="qq">
    <el-container class="home-container">
      <el-header> 驾驶行为分析后台系统 </el-header>
      <el-container>
        <el-aside width="350px">
          <el-row class="tac">
            <el-col>
              <el-menu
                background-color="#333744"
                text-color="#fff"
                active-text-color="#409EFF"
                default-active="2"
                class="el-menu-vertical-demo"
                @open="handleOpen"
                @close="handleClose"
              >
                <el-submenu index="1">
                  <template slot="title">
                    <i class="el-icon-s-platform"></i>
                    <span>监控中心</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="1-1">监控大屏</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="2">
                  <template slot="title">
                    <i class="el-icon-truck"></i>
                    <span>车辆管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="2-1" @click="tool()">
                      <i class="el-icon-s-tools"></i>车辆维护</el-menu-item
                    >
                    <el-menu-item index="2-2">2</el-menu-item>
                    <el-menu-item index="2-3">3</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="3">
                  <template slot="title">
                    <i class="el-icon-s-custom"></i>
                    <span>司机管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="3-1" @click="driver()">
                      <i class="el-icon-s-custom"></i>
                      司机维护</el-menu-item
                    >
                  </el-menu-item-group>
                </el-submenu>
                <el-submenu index="4">
                  <template slot="title">
                    <i class="el-icon-s-order"></i>
                    <span>行为统计</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="4-1">1</el-menu-item>
                    <el-menu-item index="4-2">2</el-menu-item>
                    <el-menu-item index="4-3">3</el-menu-item>
                  </el-menu-item-group>
                </el-submenu>
              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <!-- 路由占位符 -->
        <el-main><router-view></router-view></el-main>
      </el-container>
    </el-container>
  </div>
</template>


<script>
export default {
  data() {
    const item = {
      date: "2016-05-02",
      name: "王小虎",
      address: "上海市普陀区金沙江路 1518 弄",
    };
    return {
      tableData: Array(20).fill(item),
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    tool() {
      this.$router.push("/carlist");
    },
    driver() {
      this.$router.push("/driverlist");
    },
  },
};
</script>
<style >
.home-container {
  height: 100%;
}
.el-header {
  color: #409eff;
  /* background-color: #373d41; */
  font-size: 40px;
  text-align: center;
}

.el-aside {
  background-color: #333744;
}

.el-main {
  /* background-color: #e9eef3; */
  color: #333;
  /* text-align: center; */
  /* line-height: 160px; */
}
</style>